

package com.hulk.dryad.persistence.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.hulk.dryad.common.constant.CommonConstants;
import com.hulk.dryad.persistence.injector.datascope.mapper.DataScopeMapper;
import com.hulk.dryad.persistence.entity.SysRoleModel;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author kim
 * @since 2017-10-29
 */
@DS("#" + CommonConstants.TENANT_ID)
@Mapper
public interface SysRoleMapper extends DataScopeMapper<SysRoleModel> {

	/**
	 * 通过用户ID，查询角色信息
	 * @param userId
	 * @return
	 */
	List<SysRoleModel> listRolesByUserId(Long userId);

	List<SysRoleModel> listRoles();

}
